﻿<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="Pragma" content="no-cache">
<title>WebNoteEditor</title>
<link rel="STYLESHEET" type="text/css" id="SkinStyleSheet">
<script language="javascript" type="text/javascript" src="../script/windialog.js"></script>
<script language="javascript" type="text/javascript" src="../script/ie2w3c-min.js"></script>
<script language="javascript" type="text/javascript">
window.onload=function()
{
	//renderWindowAsIE(window);
	var filepath=EditorWindow.getUrlArgment("file",document);
	filepath=unescape(filepath);
	if (filepath=="")
	{
		window.close();
		return;
	}

	var ext=EditorWindow.getFileExt(filepath);
	
	if (EditorWindow.$config.allow_upload_image_ext.isInArray(ext))
	{
		document.getElementById("frmUpload").contentWindow.location="mt_uploadimg.htm?file="+escape(filepath);
	}
	else
	{
		document.getElementById("frmUpload").contentWindow.location="mt_uploadotherfile.htm?file="+escape(filepath);
	}
	AutoResizeDialogWindow();
	
	document.getElementById("btnOk").onclick=__btnOk_onclick;
	document.getElementById("btnCancleOne").onclick=__btnCancleOne_onclick;
	document.getElementById("btnCancleAll").onclick=__btnCancleAll_onclick;

}

function __btnOk_onclick()
{
	document.getElementById("frmUpload").contentWindow.UploadIt();
}
function __btnCancleOne_onclick()
{
	window.close();
}

function __btnCancleAll_onclick()
{
	window.returnValue="CancelAll";
	window.close();
}

function __Close(sReturnValue)
{
	window.returnValue=sReturnValue;
	window.close();
}

function CannotSave()
{
	alert(EditorWindow.lang_error_upload_unknowfile);
	window.returnValue="";
}

function RaiseError1()
{
	alert(EditorWindow.lang_upload_largerthanmax);
	window.returnValue="";
}

function CaculateProg()
{
	document.getElementById("ProgressBar1").style.display="";
}
</script>

</head>

<body class="dialog">
<script language="javascript" type="text/javascript">dialogTitle("lang_uploadfile");</script>
<iframe id="frmUpload" src="" width="100%" height="280" scrolling="auto"></iframe>
<div>
	<img src="../images/progressbar.gif" id="ProgressBar1" style="display:none">
</div>
<div id="UpLoadStatus"></div>
<div class="alerttext">
	<script language="javascript" type="text/javascript">dialogPrintlang("lang_tips100");</script> 
</div>
<div class="buttons">
	<script language="javascript" type="text/javascript">
	    document.write("<input type=\"button\" value=\""+EditorWindow.lang_upload+"\" id=\"btnOk\" class=\"SysBtn5\">");
		document.write("<input type=\"button\" value=\""+EditorWindow.lang_button_cancel+"\" id=\"btnCancleOne\" class=\"SysBtn5\">");
		document.write("<input type=\"button\" value=\""+EditorWindow.lang_button_cancelall+"\" id=\"btnCancleAll\" class=\"SysBtn5\">");
	</script>
</div>

</body>

</html>
